package com.carkeeper.service.serviceFallback;

import com.carkeeper.dto.UserDTO;
import com.carkeeper.service.UserFeign;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author ：XXX
 * @date ：Created in 2020/6/1
 * @description ：
 * @version: 1.0
 */
@Component
public class UserFallbackFactory implements FallbackFactory<UserFeign> {
    @Override
    public UserFeign create(Throwable throwable) {
        return new UserFeign() {
            @Override
            public UserDTO getUser(Long id) {
                return null;
            }

            @Override
            public List<UserDTO> getByIds(List<Long> ids) {
                return null;
            }
        };
    }
}
